﻿using SkiaSharp;

namespace QT.Lib.SkiaSharp
{
    /// <summary>
    /// 图片编解码
    /// </summary>
    public static class ImageCodec
    {
        /// <summary>
        /// 二进制文件解码成图片
        /// </summary>
        /// <param name="bytes"></param>
        /// <returns></returns>
        public static SKImage Decode(this byte[] bytes) 
        {
           return SKImage.FromEncodedData(bytes);
        }
    }
}
